Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  


RE: Different behaviour of NotesDocumentCollection when Transaction Logging is enabled/disabled with possible loss of data
~Umberto Nongeroson 9.Oct.03 06:25 PM a Web browser
Applications Development 6.0.2 CF2 Windows 2000


There may be some difference in when the document is read from disk depending on whether transaction logging is enabled. However, this only increases or decreases your odds of a conflict with user editing. It's perfectly possible for a new version of a document to be saved by a user while your agent is working on it even if the document was just read from disk.

To avoid all chance of this occurring, you must use the Save argument that tests whether there is a save conflict and aborts the save. Something like this:

set nextdoc = coll.getnextdocument(doc)
Do
    ' do your document processing here.
    savedOK = doc.Save(False, False)
    if Not savedOK then ' probable save conflict.
      ' get the document out of memory and read it again from disk.
      strTemp = doc.NoteID
      delete doc
      set doc = db.GetDocumentByID(strTemp)
    end if
loop until savedOK
set doc = nextdoc

Disclaimer: this is just off the top of my head; you probably should do something to prevent an infinite loop in case the save fails for some reason other than a user editing the document.




Different behaviour of NotesDocumen... (~Dan Brefreepul... 9.Oct.03)
. . RE: Different behaviour of NotesDoc... (~Bill Frokimari... 9.Oct.03)
. . . . No, this is not about save conflict... (~Dan Brefreepul... 10.Oct.03)
. . . . . . RE: No, this is not about save conf... (~Bill Frokimari... 10.Oct.03)
. . . . . . . . RE: No, this is not about save conf... (~Naomi Deskrote... 11.Oct.03)
. . . . . . . . . . RE: No, this is not about save conf... (~Bill Frokimari... 12.Oct.03)
. . Something weird's going on ... (~Dan Brefreepul... 13.Oct.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS